package com.woyou.ui.activity;

import java.util.Timer;
import java.util.TimerTask;

import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;

import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import cn.jpush.android.api.JPushInterface;

import com.citaq.ideliver.R;
import com.woyou.model.FileModel;

@EActivity
public class FlashActivity extends BaseActivity {

	@Bean
	FileModel mFileCtrl;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_flash);

		mFileCtrl.loadConfig();

		new Timer().schedule(new TimerTask() {

			@Override
			public void run() {
				runOnUiThread(new Runnable() {

					public void run() {
//						if (SharedpreferncesUtil.getGuided(mContext)) {
//							HomeActivity_.intent(mContext).start();
//							FlashActivity.this.finish();
//						} else {
//							Intent intent = new Intent(FlashActivity.this, WelcomeActivity.class);
//							FlashActivity.this.startActivity(intent);
//							FlashActivity.this.finish();
//						}
						openActivity(HomeActivity_.class, null);
						finish();
					}
				});
			}
		}, 2000);
	}

	@Override
	public void onResume() {
		super.onResume();
		JPushInterface.onResume(this);
	}

	@Override
	public void onPause() {
		super.onPause();
		JPushInterface.onPause(this);

	}

	@Override
	public boolean backOperate() {
		return false;
	}
	

}
